<!DOCTYPE html>
<html lang=zh-CN>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta property="og:description" content="samuel-24276的博客">
    <meta property="og:type" content="website">
    <meta name="description" content="samuel-24276的博客">
    <meta name="keyword"  content="aircloud">
    <link rel="shortcut icon" href="/myblog/img/favicon.ico">

    <title>
        
        codeup_1918 _简单计算器 - samuel-24276的博客 | samuel-24276&#39;s Blog
        
    </title>

    <!-- Custom CSS -->
    
<link rel="stylesheet" href="/myblog/css/aircloud.css">

    
<link rel="stylesheet" href="/myblog/css/gitment.css">

    <!--<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">-->
    <link href="//at.alicdn.com/t/font_620856_28hi1hpxx24.css" rel="stylesheet" type="text/css">
    <!-- ga & ba script hoook -->
    <script></script>
<meta name="generator" content="Hexo 7.1.1"></head>

<body>

<div class="site-nav-toggle" id="site-nav-toggle">
    <button>
        <span class="btn-bar"></span>
        <span class="btn-bar"></span>
        <span class="btn-bar"></span>
    </button>
</div>

<div class="index-about">
    <i> Like what you do, do what you like </i>
</div>

<div class="index-container">
    
    <div class="index-left">
        
<div class="nav" id="nav">
    <div class="avatar-name">
        <div class="avatar ">
            <img src="/myblog/img/avatar.jpg" />
        </div>
        <div class="name">
            <i>samuel-24276</i>
        </div>
    </div>
    <div class="contents" id="nav-content">
        <ul>
            <li >
                <a href="/myblog/">
                    <i class="iconfont icon-shouye1"></i>
                    <span>主页</span>
                </a>
            </li>
            <li >
                <a href="/myblog/tags">
                    <i class="iconfont icon-biaoqian1"></i>
                    <span>标签</span>
                </a>
            </li>
            <li >
                <a href="/myblog/archives">
                    <i class="iconfont icon-guidang2"></i>
                    <span>存档</span>
                </a>
            </li>
            <li >
                <a href="/myblog/collect/">
                    <i class="iconfont icon-shoucang1"></i>
                    <span>收藏</span>
                </a>
            </li>
            <li >
                <a href="/myblog/about/">
                    <i class="iconfont icon-guanyu2"></i>
                    <span>关于</span>
                </a>
            </li>
            
            <li>
                <a id="search">
                    <i class="iconfont icon-sousuo1"></i>
                    <span>搜索</span>
                </a>
            </li>
            
        </ul>
    </div>
    
        <div id="toc" class="toc-article">
    <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#1-%E5%A4%A7%E8%87%B4%E6%80%9D%E8%B7%AF%EF%BC%9A"><span class="toc-text">1.大致思路：</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2-%E5%A4%B4%E6%96%87%E4%BB%B6"><span class="toc-text">2.头文件</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#3-%E5%A3%B0%E6%98%8E%E5%85%A8%E5%B1%80%E5%8F%98%E9%87%8F"><span class="toc-text">3.声明全局变量</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#4-%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2%E5%87%BD%E6%95%B0"><span class="toc-text">4.类型转换函数</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#5-%E8%BF%90%E7%AE%97%E5%87%BD%E6%95%B0"><span class="toc-text">5.运算函数</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#6-%E4%B8%BB%E5%87%BD%E6%95%B0"><span class="toc-text">6.主函数</span></a></li></ol>
</div>
    
</div>


<div class="search-field" id="search-field">
    <div class="search-bg" id="search-bg"></div>
    <div class="search-container">
        <div class="search-input">
            <span id="esc-search"> <i class="icon-fanhui iconfont"></i></span>
            <input id="search-input"/>
            <span id="begin-search">搜索</span>
        </div>
        <div class="search-result-container" id="search-result-container">

        </div>
    </div>
</div>

        <div class="index-about-mobile">
            <i> Like what you do, do what you like </i>
        </div>
    </div>
    
    <div class="index-middle">
        <!-- Main Content -->
        


<div class="post-container">
    <div class="post-title">
        codeup_1918 _简单计算器
    </div>

    <div class="post-meta">
        <span class="attr">发布于：<span>2019-02-12 22:14:38</span></span>
        
        <span class="attr">标签：/
        
        <a class="tag" href="/myblog/tags/#数据结构" title="数据结构">数据结构</a>
        <span>/</span>
        
        <a class="tag" href="/myblog/tags/#C++" title="C++">C++</a>
        <span>/</span>
        
        
        </span>
        <span class="attr">访问：<span id="busuanzi_value_page_pv"></span>
</span>
</span>
    </div>
    <div class="post-content no-indent">
        <blockquote>
<p>题目描述：读入一个只含+, -, *, &#x2F;的非负整数计算表达式，计算该表达式的值<br>输入格式：输入包含若干测试用例，每个测试用例占一行，每行不超过200个字符，整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束，相应的结果不要输出。</p>
</blockquote>
<p>测试用例：</p>
<figure class="highlight basic"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="symbol">4 </span>+ <span class="number">5</span> * <span class="number">6</span> / <span class="number">3</span> - <span class="number">3</span>           </span><br><span class="line"><span class="symbol">1 </span>+ <span class="number">3</span> * <span class="number">5</span> / <span class="number">4</span> * <span class="number">8</span> / <span class="number">9</span> * <span class="number">6</span> * <span class="number">2</span> / <span class="number">3</span> / <span class="number">7</span> + <span class="number">3</span> * <span class="number">8</span> / <span class="number">2</span></span><br><span class="line"><span class="number">0</span></span><br></pre></td></tr></table></figure>
<p>测试结果</p>
<figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">11</span>.<span class="number">00</span></span><br><span class="line"><span class="attribute">14</span>.<span class="number">90</span></span><br><span class="line"><span class="attribute">0</span></span><br></pre></td></tr></table></figure>

<h1 id="1-大致思路："><a href="#1-大致思路：" class="headerlink" title="1.大致思路："></a>1.大致思路：</h1><ul>
<li>1.输入的表达式有数字也有运算符，没法具体确定，统一用string类型存储;        </li>
<li>2.后面需要对操作数与操作符分开处理，需要一个转换函数change()；       </li>
<li>3.有除法，故操作数应为double型，操作符为char型；       </li>
<li>4.操作符有优先级，故用到映射map&lt;char, int&gt;;操作符和操作数分开处理需要两个栈，但声明一个结构体node，有三个变量，分别为double,char,bool类型，bool类型负责标识其是操作数还是运算符，这样就仅需一个栈了；      </li>
<li>5.怎样标识运算完成呢，运算完后栈里的元素应该是最终结果，可以设一个队列，在change()函数里类型转换完后直接将其入队，在运算函数cal()里通过比较操作符优先级高低，对出队的元素选择入栈，最后队列为空时运算就已完成；       </li>
<li>6.元素入队前通过string类型的erase()函数可以去除空格</li>
</ul>
<h1 id="2-头文件"><a href="#2-头文件" class="headerlink" title="2.头文件"></a>2.头文件</h1><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;iostream&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&lt;cstdio&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&lt;string&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&lt;stack&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&lt;queue&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&lt;map&gt;</span>                     </span></span><br></pre></td></tr></table></figure>
<h1 id="3-声明全局变量"><a href="#3-声明全局变量" class="headerlink" title="3.声明全局变量"></a>3.声明全局变量</h1><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">using</span> <span class="keyword">namespace</span> std;</span><br><span class="line"></span><br><span class="line"><span class="keyword">struct</span> <span class="title class_">node</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="type">double</span> num;</span><br><span class="line">    <span class="type">char</span> op;</span><br><span class="line">    <span class="type">bool</span> flag;          <span class="comment">//true表示操作数，false表示操作符</span></span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line">string str;				<span class="comment">//存储输入的中缀表达式序列</span></span><br><span class="line">stack&lt;node&gt; s;          <span class="comment">//操作符栈</span></span><br><span class="line">queue&lt;node&gt; q;          <span class="comment">//存储后缀表达式序列</span></span><br><span class="line">map&lt;<span class="type">char</span>, <span class="type">int</span>&gt; op;      <span class="comment">//在main()里设置运算符优先级</span></span><br></pre></td></tr></table></figure>

<h1 id="4-类型转换函数"><a href="#4-类型转换函数" class="headerlink" title="4.类型转换函数"></a>4.类型转换函数</h1><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="type">void</span> <span class="title">change</span><span class="params">()</span>           <span class="comment">//将中缀表达式转换为后缀表达式,z转换完后s栈为空，可重新使用</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">    node temp;                                                  <span class="comment">//临时变量，用于入队</span></span><br><span class="line">    <span class="keyword">for</span>(<span class="type">int</span> i=<span class="number">0</span>; i&lt;str.<span class="built_in">length</span>(); )</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">if</span>(str[i]&gt;=<span class="string">&#x27;0&#x27;</span> &amp;&amp; str[i]&lt;=<span class="string">&#x27;9&#x27;</span>)                          <span class="comment">//如果是数字</span></span><br><span class="line">        &#123;</span><br><span class="line">            temp.flag = <span class="literal">true</span>;</span><br><span class="line">            temp.num = str[i++] - <span class="string">&#x27;0&#x27;</span>;                          <span class="comment">//记录操作数的第一个数位</span></span><br><span class="line">            <span class="comment">//操作数的位数是不确定的，需要进行判断</span></span><br><span class="line">            <span class="keyword">while</span>(i&lt;str.<span class="built_in">length</span>() &amp;&amp; str[i]&gt;=<span class="string">&#x27;0&#x27;</span> &amp;&amp; str[i]&lt;=<span class="string">&#x27;9&#x27;</span>)</span><br><span class="line">            &#123;</span><br><span class="line">                temp.num = temp.num * <span class="number">10</span> + (str[i]-<span class="string">&#x27;0&#x27;</span>);        <span class="comment">//更新这个操作数</span></span><br><span class="line">                i++;</span><br><span class="line">            &#125;</span><br><span class="line">            q.<span class="built_in">push</span>(temp);                                       <span class="comment">//操作数入队</span></span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">else</span>                                                    <span class="comment">//如果是操作符</span></span><br><span class="line">        &#123;</span><br><span class="line">            temp.flag = <span class="literal">false</span>;</span><br><span class="line">            <span class="comment">//只要操作符栈的栈顶元素优先级比该操作符优先级高</span></span><br><span class="line">            <span class="comment">//就把栈顶元素弹出到后缀表达式的队列中</span></span><br><span class="line">            <span class="keyword">while</span>(!s.<span class="built_in">empty</span>() &amp;&amp; op[str[i]]&lt;=op[s.<span class="built_in">top</span>().op])</span><br><span class="line">            &#123;</span><br><span class="line">                q.<span class="built_in">push</span>(s.<span class="built_in">top</span>());</span><br><span class="line">                s.<span class="built_in">pop</span>();</span><br><span class="line">            &#125;</span><br><span class="line">            temp.op = str[i];                                   <span class="comment">//临时变量存储下该操作符并入队</span></span><br><span class="line">            s.<span class="built_in">push</span>(temp);</span><br><span class="line">            i++;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">//如果操作符栈中还有操作符，就把他弹出到后缀表达式队列中</span></span><br><span class="line">    <span class="keyword">while</span>(!s.<span class="built_in">empty</span>())</span><br><span class="line">    &#123;</span><br><span class="line">        q.<span class="built_in">push</span>(s.<span class="built_in">top</span>());</span><br><span class="line">        s.<span class="built_in">pop</span>();</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h1 id="5-运算函数"><a href="#5-运算函数" class="headerlink" title="5.运算函数"></a>5.运算函数</h1><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="type">double</span> <span class="title">cal</span><span class="params">()</span>        <span class="comment">//计算后缀表达式</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">    <span class="type">double</span> temp1, temp2;</span><br><span class="line">    node cur, temp;</span><br><span class="line">    <span class="keyword">while</span>(!q.<span class="built_in">empty</span>())       <span class="comment">//只要后缀表达式队列不为空</span></span><br><span class="line">    &#123;</span><br><span class="line">        cur = q.<span class="built_in">front</span>();</span><br><span class="line">        q.<span class="built_in">pop</span>();</span><br><span class="line">        <span class="keyword">if</span>(cur.flag==<span class="literal">true</span>)          <span class="comment">//操作数直接入栈</span></span><br><span class="line">            s.<span class="built_in">push</span>(cur);</span><br><span class="line">        <span class="keyword">else</span></span><br><span class="line">        &#123;</span><br><span class="line">            temp2 = s.<span class="built_in">top</span>().num;</span><br><span class="line">            s.<span class="built_in">pop</span>();                <span class="comment">//弹出第二操作数</span></span><br><span class="line">            temp1 = s.<span class="built_in">top</span>().num;</span><br><span class="line">            s.<span class="built_in">pop</span>();                <span class="comment">//弹出第一操作数</span></span><br><span class="line">            temp.flag = <span class="literal">true</span>;       <span class="comment">//临时记录操作数</span></span><br><span class="line">            <span class="keyword">switch</span>(cur.op)</span><br><span class="line">            &#123;</span><br><span class="line">                <span class="keyword">case</span> <span class="string">&#x27;+&#x27;</span>:</span><br><span class="line">                    temp.num = temp1 + temp2;</span><br><span class="line">                    <span class="keyword">break</span>;</span><br><span class="line">                <span class="keyword">case</span> <span class="string">&#x27;-&#x27;</span>:</span><br><span class="line">                    temp.num = temp1 - temp2;</span><br><span class="line">                    <span class="keyword">break</span>;</span><br><span class="line">                <span class="keyword">case</span> <span class="string">&#x27;*&#x27;</span>:</span><br><span class="line">                    temp.num = temp1 * temp2;</span><br><span class="line">                    <span class="keyword">break</span>;</span><br><span class="line">                <span class="keyword">case</span> <span class="string">&#x27;/&#x27;</span>:</span><br><span class="line">                    temp.num = temp1 / temp2;</span><br><span class="line">                    <span class="keyword">break</span>;</span><br><span class="line">            &#125;</span><br><span class="line">            s.<span class="built_in">push</span>(temp);           <span class="comment">//把计算完的操作数入栈</span></span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> s.<span class="built_in">top</span>().num;             <span class="comment">//最后栈里的元素就是后缀表达式的结果</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h1 id="6-主函数"><a href="#6-主函数" class="headerlink" title="6.主函数"></a>6.主函数</h1><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="type">int</span> <span class="title">main</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">    op[<span class="string">&#x27;+&#x27;</span>] = op[<span class="string">&#x27;-&#x27;</span>] = <span class="number">1</span>;</span><br><span class="line">    op[<span class="string">&#x27;*&#x27;</span>] = op[<span class="string">&#x27;/&#x27;</span>] = <span class="number">2</span>;</span><br><span class="line">    <span class="keyword">while</span>(<span class="built_in">getline</span>(cin, str), str!=<span class="string">&quot;0&quot;</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">for</span>(string::iterator it = str.<span class="built_in">end</span>(); it!=str.<span class="built_in">begin</span>(); it--)</span><br><span class="line">        &#123;</span><br><span class="line">            <span class="keyword">if</span>(*it == <span class="string">&#x27; &#x27;</span>)</span><br><span class="line">                str.<span class="built_in">erase</span>(it);      <span class="comment">//去掉表达式的所有空格</span></span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">while</span>(!s.<span class="built_in">empty</span>())</span><br><span class="line">            s.<span class="built_in">pop</span>();                <span class="comment">//初始化栈</span></span><br><span class="line">        <span class="built_in">change</span>();                   <span class="comment">//中缀转后缀</span></span><br><span class="line">        <span class="built_in">printf</span>(<span class="string">&quot;%.2f\n&quot;</span>, <span class="built_in">cal</span>());    <span class="comment">//计算后缀表达式</span></span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p><em><strong>Tips：</strong></em><br>函数可以在判断语句中执行，因此题目要求的测试用例不知数量时，可以用<code>while(scanf()!=EOF)</code>或<code>while(getline(cin, str), str!=&quot;0&quot;)</code>，即<code>while(执行语句，判断条件)</code>将程序包裹起来。</p>
<hr>

        
            <div class="donate-container">
    <div class="donate-button">
        <button id="donate-button">赞赏</button>
    </div>
    <div class="donate-img-container hide" id="donate-img-container">
        <img id="donate-img" src="" data-src="/myblog/img/donate.jpg">
        <p> 感谢鼓励 </p>
    </div>
</div>
        
        <br />
        <div id="comment-container">
        </div>
        <div id="disqus_thread"></div>
        <div id="lv-container"></div>
        <div class="giscus"></div>
    </div>
</div>

    </div>
</div>


<footer class="footer">
    <ul class="list-inline text-center">
        
        

        

        

        
        <li>
            <a target="_blank"  href="https://github.com/samuel-24276">
                            <span class="fa-stack fa-lg">
                                <i class="iconfont icon-github"></i>
                            </span>
            </a>
        </li>
        

        

    </ul>
    
    <p>
        <span>/</span>
        
        <span><a target="_blank" rel="noopener" href="https://github.com/samuel-24276">samuel-24276&#39;s Page</a></span>
        <span>/</span>
        
        <span><a target="_blank" rel="noopener" href="https://beian.miit.gov.cn/">北京-未备案</a></span>
        <span>/</span>
        
        <span><a href="#">返回顶部</a></span>
        <span>/</span>
        
    </p>
    
    <p>
        <span id="busuanzi_container_site_pv">
            <span id="busuanzi_value_site_pv"></span>PV
        </span>
        <span id="busuanzi_container_site_uv">
            <span id="busuanzi_value_site_uv"></span>UV
        </span>
        Created By <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>  Theme <a target="_blank" rel="noopener" href="https://github.com/aircloud/hexo-theme-aircloud">AirCloud</a></p>
</footer>




</body>

<script>
    // We expose some of the variables needed by the front end
    window.hexo_search_path = "search.json"
    window.hexo_root = "/myblog/"
    window.isPost = true
</script>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>

<script src="/myblog/js/index.js"></script>

<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>






    <script type="text/javascript">
       (function() {
           if (typeof LivereTower === 'function') { return; }

           var j, d = document.getElementById('lv-container');

           d.setAttribute('data-id','city');
           d.setAttribute('data-uid' , 'MTAyMC80OTA5OC8yNTU5Mw==');

           j = document.createElement('script');
           j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
           j.async = true;

           d.appendChild(j);
       })();
    </script>
    <noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
    </div>

</html>
